package com.itheima;

import java.util.Iterator;
import java.util.LinkedHashSet;

/**
 * @ProjectName: ybxy6
 * @Titile: LinkedHashSetDemo
 * @Author: Muelsyse
 * @Description: TODO
 */
public class LinkedHashSetDemo {
    // 主方法
    public  static void main(String[] args) {
        LinkedHashSet<String> set = new LinkedHashSet<>();

        set.add("a");
        set.add("b");
        set.add("c");
        set.add("d");
        Iterator<String> iterator = set.iterator();
        while (iterator.hasNext()) {
            System.out.println(iterator.next());

        }

    }
}

